package edu.sctu.zcy.month201505.subwaysystem.V3;

/**
 * Created by user24 on 2015/6/4.
 */
public class Passenger {


    public String name;
    public Package package1 = new Package();
    public Water water = new Water();
    public Card card = new Card();
    public Route route = new Route();
    private boolean isCard;
    private boolean isPackage1;
    private boolean isWater;
    private String action;


    public void hasCard() {

        if (isCard) {

            System.out.println("无需买卡");
        } else {

            System.out.println("请办卡消费");
        }
    }


    public void onMetro() {


    }


    public boolean isCard() {
        return isCard;
    }


    public void setCard(boolean isCard) {
        this.isCard = isCard;
    }

    public boolean hasPackage() {
        return isPackage1;
    }

    public void setPackage(boolean isPackage1) {
        this.isPackage1 = isPackage1;
    }

    public boolean hasWater() {
        return isWater;
    }

    public void setWater(boolean isWater) {
        this.isWater = isWater;
    }

    public void inStatation() {

        System.out.println("乘客入站");
    }


    public int outStation(int i) {

        int price = new DeductionsRules().getPrice(i);
        System.out.println("出站，扣费" + price + "元");

        return price;
    }


    public String getAction() {
        return action;
    }

    public void setAction(String action) {
        this.action = action;
    }
}
